package hoowin.app.wsnd.action;

import hoowin.app.wsnd.service.TranslationService;
import hoowin.basic.model.User;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class AddTranslation extends ActionSupport {
	private String translationText;
	private String language;
	private int statusId;
	private User user;
	private TranslationService translationService;
	public String execute(){
		if(translationText==null || translationText.length()==0 || user.getId()==0);
		else{
			translationService.addTranslation(translationText, language, statusId, user.getId());
		}
		return SUCCESS;
	}
	
	public void setTranslationText(String translationText) {
		this.translationText = translationText;
	}
	public String getTranslationText() {
		return translationText;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
	public String getLanguage() {
		return language;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return user;
	}

	public void setTranslationService(TranslationService translationService) {
		this.translationService = translationService;
	}

	public TranslationService getTranslationService() {
		return translationService;
	}

	public void setStatusId(int statusId) {
		this.statusId = statusId;
	}

	public int getStatusId() {
		return statusId;
	}
}
